CC "AdoScript" SET_CWD path:(sADOxxPathGeo) #CC "AdoScript" INFOBOX (nCurrentObjID) CC "Modeling" GET_ACT_MODEL SETL nCurrentModelID:(modelid) CC "Core" GET_CLASS_ID classname:("Business Entity") SETL nMarkerClassID:(classid) CC "Core" GET_ATTR_ID classid:(nMarkerClassID) attrname:("GeoLocation Data") SETL nGeoLocationDataAttrID:(attrid) CC "Core" GET_ATTR_ID classid:(nMarkerClassID) attrname:("Longitude") SETL nMarkerLongAttrID:(attrid) CC "Core" GET_ATTR_ID classid:(nMarkerClassID) attrname:("Latitude") SETL nMarkerLatAttrID:(attrid) CC "Core" GET_ATTR_ID classid:(nMarkerClassID) attrname:("Longitude (Map)") SETL nMarkerMLongAttrID:(attrid) CC "Core" GET_ATTR_ID classid:(nMarkerClassID) attrname:("Latitude (Map)") SETL nMarkerMLatAttrID:(attrid) CC "Core" GET_ATTR_ID classid:(nMarkerClassID) attrname:("Location display name") SETL nDisplayNameAttrID:(attrid) CC "Core" GET_ATTR_ID classid:(nMarkerClassID) attrname:("Location name") SETL nLocationNameAttrID:(attrid) #COPY the LONG LAT VALUES from MODEL to GEO CC "Core" GET_ATTR_VAL modelid:(nCurrentModelID) objid:(nCurrentObjID) attrid:(nMarkerMLongAttrID) SETL nMLongValue:(val) CC "Core" SET_ATTR_VAL modelid:(nCurrentModelID) objid:(nCurrentObjID) attrid:(nMarkerLongAttrID) val:(nMLongValue) CC "Core" GET_ATTR_VAL modelid:(nCurrentModelID) objid:(nCurrentObjID) attrid:(nMarkerMLatAttrID) SETL nMLatValue:(val) CC "Core" SET_ATTR_VAL modelid:(nCurrentModelID) objid:(nCurrentObjID) attrid:(nMarkerLatAttrID) val:(nMLatValue) CC "AdoScript" GET_TEMP_FILENAME SETL sMarkerJSONFile:(filename) SYSTEM ("download_location.bat \""+STR nMLatValue+"\" \""+STR nMLongValue+"\" \""+sMarkerJSONFile+"\" \"" +g_sProxyServer+"\"") with-console-window CC "AdoScript" FREAD file:(sMarkerJSONFile) SETL sLocationJSON:(text) #SET display name SETL sTempDisplayNameString:(copy (sLocationJSON, search(sLocationJSON, "\"display_name\":\"", 0)+16, -1)) SETL sDisplayNameString:(copy (sTempDisplayNameString, 0, search (sTempDisplayNameString, "\"", 0))) CC "Core" SET_ATTR_VAL objid:(nCurrentObjID) attrid:(nDisplayNameAttrID) val:(sDisplayNameString) CC "Core" SET_ATTR_VAL objid:(nCurrentObjID) attrid:(nLocationNameAttrID) val:(sDisplayNameString)